package cn.sciento.farm.devicemanager.service.impl;

import cn.sciento.farm.devicemanager.dao.entity.TenantSmsPayLog;
import cn.sciento.farm.devicemanager.dao.mapper.TenantSmsPayLogMapper;
import cn.sciento.farm.devicemanager.service.TenantSmsPayLogService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author walton
 * @description
 * @date 2020/11/24 11:33
 */
@Service
public class TenantSmsPayLogServiceImpl implements TenantSmsPayLogService {

    @Autowired
    private TenantSmsPayLogMapper smsPayLogMapper;

    @Override
    public IPage<TenantSmsPayLog> getPayLog() {
        return smsPayLogMapper.selectPage(new Page<>(1, 10), null);
    }

    @Override
    public int createSmsPayLog(TenantSmsPayLog smsPayLog) {
        return smsPayLogMapper.insert(smsPayLog);
    }
}
